Decision tree from scratch